<!--
 * @Date: 2022-05-09 11:06:16
 * @Author: 陶子
 * @LastEditTime: 2023-06-06 19:23:17
 * @FilePath: \jk_one-stop_pc\src\views\baseManagement\maintain\repairWaite\repairWaiteList.vue
 * @pageName: 这是--(报修待接收列表)--页面
-->
<template>
  <div class="pagebox">
    <crumbs
      @goBack="() => {}"
      :superiorMenu="['设备管理', '设备维修']"
      currentMenu="报修待接收"
      style="margin-bottom: 12px"
    ></crumbs>
    <a-card :bordered="false" size="small" style="height: 100%">
      <div class="topBox">
        <div>
          <a-button @click="handleShowFilter" icon="filter" style="margin-right: 10px">
            筛选 <span style="color: #1890ff; margin-left: 5px">{{ realFilterNum }}</span></a-button
          >
          <a-button @click="showColumn" icon="unordered-list" style="margin-right: 10px"> 设置列 </a-button>
        </div>
      </div>
      <a-table
        :key="tableKey"
        row-key="id"
        :columns="columns"
        size="middle"
        :data-source="tableData"
        :pagination="false"
        :scroll="{ x: computedX, y: 'calc(100vh - 358px)' }"
        :row-selection="{
          selectedRowKeys: selectedRowKeys,
          columnTitle: ' ',
          onChange: onSelectChange,
        }"
        @change="tableChange"
        :components="drag(columns, 'REPAIRWAITE_LIST')"
      >
        <!-- 输入框搜索 -->
        <div slot="searchDropdown" slot-scope="{ confirm, clearFilters, column }" class="searchWorkOreder">
          <a-input
            :placeholder="checkPlaceholder(column.dataIndex)"
            v-model="tableFilterForm[column.dataIndex]"
            style="width: 188px; display: block"
          />
          <a-button
            type="primary"
            style="width: 80px; margin-left: 20px; display: block"
            @click="() => pubSearch(confirm, column.dataIndex, clearFilters)"
          >
            搜索
          </a-button>
        </div>
        <a-icon
          slot="searchIcon"
          slot-scope="filtered"
          type="search"
          :style="{ color: filtered ? '#108ee9' : undefined }"
        />
        <!-- 选择搜索 -->
        <div slot="selectDropdown" slot-scope="{ confirm, clearFilters, column }" class="searchWorkOreder">
          <a-select
            mode="multiple"
            :placeholder="checkPlaceholder(column.dataIndex)"
            style="width: 200px"
            v-model="tableFilterForm[column.dataIndex]"
          >
            <a-select-option v-for="item in urgentList" :key="item.value" :value="item.value">
              {{ item.text }}
            </a-select-option>
          </a-select>
          <a-button
            type="primary"
            style="width: 80px; margin-left: 20px; display: block"
            @click="() => pubSearch(confirm, column.dataIndex, clearFilters)"
          >
            搜索
          </a-button>
        </div>
        <a-icon
          slot="selectIcon"
          slot-scope="filtered"
          type="filter"
          :style="{ color: filtered ? '#108ee9' : undefined }"
        />
        <!-- 插槽显示 -->
        <span
          slot="repairCode"
          @click="openDetail(record)"
          slot-scope="text, record"
          style="color: #1890ff; cursor: pointer"
          >{{ text }}</span
        >
        <span slot="deviceName" slot-scope="text, record" :title="record.deviceName">{{ record.deviceName }}</span>
        <span slot="deviceCategory" slot-scope="text, record" :title="record.deviceCategoryText">{{
          record.deviceCategoryText
        }}</span>
        <span slot="faultDescription" slot-scope="text, record" :title="record.faultDescription">{{
          record.faultDescription
        }}</span>
        <span slot="urgencyText" slot-scope="text, record" :title="record.urgencyText">{{ record.urgencyText }}</span>
        <span slot="repairStartTime" slot-scope="text, record">{{
          moment(record.repairStartTime).format('YYYY-MM-DD HH:mm')
        }}</span>
        <span slot="repairEndTime" slot-scope="text, record">{{
          moment(record.repairEndTime).format('YYYY-MM-DD HH:mm')
        }}</span>
        <span slot="happenTime" slot-scope="text, record">{{
          moment(record.happenTime).format('YYYY-MM-DD HH:mm')
        }}</span>
        <!-- 操作 -->
        <span slot="actions" slot-scope="text, record">
          <span class="pubColor" @click="handleWithdraw(record)">接收</span>
          <a-divider type="vertical" />
          <span class="pubColor" @click="verification(record)">派工</span>
        </span>
      </a-table>
    </a-card>
    <div
      class="uni-card resetPadding"
      :style="{
        position: 'fixed',
        bottom: 0,
        right: 0,
        zIndex: 2,
        left: collapsed ? '79px' : '208px',
        background: '#fff',
        paddingLeft: '43px',
      }"
    >
      <div style="display: inline-block">
        <a-checkbox :indeterminate="listIndeterminate" :checked="listCheckAll" @change="onCheckAllChange"></a-checkbox>
        <span style="margin-left: 8px">
          {{ `已选 ${selectedRowKeys.length}/${total} 项` }}
          <span class="pubColor" @click="clearArr" style="margin: 0 10px">清空</span>
        </span>
        <span class="pubColor" style="margin: 0 24px" @click="batchAccept">接收</span
        ><span class="pubColor" @click="batchAction">派工</span>
      </div>
      <div style="display: inline-block; float: right">
        <a-pagination
          :total="total"
          v-model="current"
          :page-size-options="pageSizeOptions"
          :page-size="pageSize"
          @change="onChangePage"
          @showSizeChange="onShowSizeChange"
          show-quick-jumper
          show-size-changer
        />
      </div>
    </div>
    <SetColumn
      columnName="设置列"
      ref="SetColumn"
      v-if="showSetColumn"
      @sureBtn="sureBtn"
      @cancelBtn="showSetColumn = false"
    />
    <!-- 筛选抽屉 -->
    <a-drawer width="500" :closable="true" :visible="showFilter" @close="closeFilter">
      <div class="filter-body">
        <div slot="title" class="uni-card filter-tit">
          筛选 <span class="filter-num">{{ filteredNums }}</span>
        </div>
        <div class="uni-card" v-if="filteredNums > 0" style="background: #fff">
          <div v-for="(item, i) in filteredList" :key="i" v-show="checkShow(item.text)" class="tag-wrap">
            <span class="filter-tag" @click="delFiltered(item.key)">
              <span class="tag-text">{{ `${item.title}：${item.text}` }}</span>
              <a-icon type="close" style="float: right" />
            </span>
          </div>
        </div>
        <div style="overflow-y: scroll; flex: 1; padding: 0">
          <div class="uni-card" style="background: #fff">
            <a-form-model layout="vertical" :model="filterForm">
              <a-form-model-item label="报修编号">
                <a-input v-model="filterForm.repairCode" placeholder="请输入" />
              </a-form-model-item>
              <a-form-model-item label="设备编号">
                <a-input v-model="filterForm.deviceCode" placeholder="请输入" />
              </a-form-model-item>
              <a-form-model-item label="设备名称">
                <a-input v-model="filterForm.deviceName" placeholder="请输入" />
              </a-form-model-item>
              <a-form-model-item label="紧急程度">
                <a-select mode="multiple" placeholder="请选择" v-model="filterForm.extentStatusList" allowClear>
                  <a-select-option v-for="item in urgentList" :key="item.value" :value="item.value">
                    {{ item.text }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
              <a-form-model-item label="提交时间">
                <a-range-picker
                  date-format="YYYY-MM-DD"
                  :placeholder="['请输入', '请输入']"
                  v-model="modelApplyTime"
                  style="width: 100%"
                  @change="timeApplyChange"
                />
              </a-form-model-item>
            </a-form-model>
          </div>
        </div>
        <div class="footer-submit">
          <a-button class="margin-btn" @click="resetFilter">重置</a-button>
          <a-button type="primary" @click="handleFilter">确定</a-button>
        </div>
      </div>
    </a-drawer>
    <a-modal title="派工" :width="600" :visible="modalShow" :closable="false" :maskClosable="false">
      <a-form-model
        ref="ruleForm"
        :model="modalForm"
        :rules="modalRules"
        :labelCol="{ span: 4 }"
        :wrapperCol="{ span: 19 }"
        labelAlign="left"
      >
        <a-form-model-item style="margin-bottom: 10px" prop="assignedRepairPersonnel">
          <span slot="label">维修人员：</span>
          <j-select-user-by-dep
            @changeRow="createChange"
            v-model="repairStr"
            :seldep="true"
            :modalWidth="1000"
            :limit="1"
            :multi="false"
          >
          </j-select-user-by-dep>
        </a-form-model-item>
      </a-form-model>
      <template slot="footer">
        <a-button @click="selectCancel">取消</a-button>
        <a-button type="primary" @click="selectOk">确认</a-button>
      </template>
    </a-modal>
    <repairDetail ref="repairDetail"></repairDetail>
  </div>
</template>
<script>
import moment from 'moment'
import { messDeviceRepair, batchValidOrUpdateStatus, receiveRepair, dispatch } from '@/api/productOrder'
import { columns, allColumn } from './waiteColumn.js'
import { getNewColumns, compareDate, subStrText } from '@/utils/util'
import SetColumn from '@/pubComponent/SetColumn.vue'
import crumbs from '@/components/crumbs.vue'
import { mapState } from 'vuex'
import workOrder from '@/views/workManagement/workOrder/print/workOrder'
import circulationCard from '@/views/workManagement/workOrder/print/circulationCard'
import { ajaxGetDictItems } from '@/api/api'
import tableDragResize from '@/mixins/tableDragResize'
const actionArr = [
  {
    fixed: 'right',
    title: '操作',
    align: 'left',
    dataIndex: 'actions',
    ellipsis: true,
    width: 114,
    scopedSlots: { customRender: 'actions' },
  },
]
export default {
  components: {
    crumbs,
    SetColumn,
    workOrder,
    circulationCard,
    repairDetail: (resolve) => require(['@/views/baseManagement/maintain/repairDetail'], resolve),
  },
  mixins: [tableDragResize],
  data() {
    return {
      moment,
      subStrText,
      columns,
      tableData: [],
      selectedRowKeys: [],
      urgentList: [],
      //全选按钮
      modelApplyTime: [],
      listIndeterminate: false,
      listCheckAll: false,
      current: 1,
      total: 0,
      pageSize: 10,
      pageSizeOptions: ['10', '20', '30', '40', '50'],
      showSetColumn: false,
      operateType: '',
      // 抽屉数据
      showFilter: false, // 筛选抽屉
      realFilterForm: {},
      tableFilterForm: {},
      filterForm: {
        repairCode: '',
        deviceCode: '',
        deviceName: '',
        extentStatusList: [],
        commitTime: [],
      },
      filteredFormLable: {
        repairCode: '报修编号',
        deviceCode: '设备编号',
        deviceName: '设备名称',
        extentStatusList: '紧急程度',
        commitTime: '提交时间',
      },
      modalShow: false,
      repairStr: '',
      modalForm: {
        assignedRepairPersonnel: undefined,
      },
      modalRules: {
        assignedRepairPersonnel: [{ required: true, message: '请选择', trigger: 'change' }],
      },
      itemInfo: {},
      tableKey: 1.9,
    }
  },
  computed: {
    ...mapState({
      collapsed: (state) => state.user.collapsed,
    }),
    computedX() {
      let xnum = 0
      for (let item of this.columns) {
        xnum += Number(item.width)
      }

      return xnum
    },
    realFilterNum() {
      let nums = 0
      for (let key in this.realFilterForm) {
        if (this.realFilterForm[key] != '') {
          nums += 1
        }
      }
      return nums
    },
    filteredNums() {
      let nums = 0
      for (let key in this.filterForm) {
        if (this.filterForm[key] != '') {
          nums += 1
        }
      }
      return nums
    },
    filteredList() {
      let list = []
      for (let key in this.filterForm) {
        if (this.filteredFormLable[key] == '紧急程度') {
          let strArr = ''
          for (let item of this.filterForm[key]) {
            for (let each of this.urgentList) {
              if (item == each.value) {
                strArr += each.text + '，'
              }
            }
          }
          if (strArr) {
            strArr = strArr.substring(0, strArr.length - 1)
          }
          list.push({
            title: this.filteredFormLable[key],
            text: strArr,
            key,
          })
        } else {
          list.push({
            title: this.filteredFormLable[key],
            text: this.filterForm[key],
            key,
          })
        }
      }
      return list
    },
  },
  created() {
    let oldValue = localStorage.getItem(this.BUSI_CONST.Entity.REPAIRWAITE_LIST)
    this.columns = getNewColumns(allColumn, JSON.parse(oldValue), actionArr, this.columns)
    let obj = {
      pageNo: this.current,
      pageSize: this.pageSize,
    }
    this.getData(obj)
    this.getDictCode()
  },
  methods: {
    createChange(storeVals, row) {
      let newStr = ''
      if (row.length > 0) {
        let newArr = []
        for (let item of row) {
          newArr.push(item.id)
        }
        if (newArr.length > 0) {
          newStr = newArr.join(',')
        }
      } else {
        newStr = ''
      }
      this.$set(this.modalForm, 'assignedRepairPersonnel', newStr)
      this.$refs['ruleForm'].validateField(['assignedRepairPersonnel'])
    },
    verification(row) {
      this.itemInfo = row
      this.operateType = 'single'
      this.modalShow = true
    },
    selectCancel() {
      this.modalForm = {
        assignedRepairPersonnel: undefined,
      }
      this.repairStr = ''
      this.modalShow = false
    },
    selectOk() {
      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
          let modalObj = {
            ...this.modalForm,
            repairId: this.operateType == 'single' ? this.itemInfo.id : this.selectedRowKeys.join(','),
          }
          dispatch(modalObj).then((res) => {
            if (res.code == 200) {
              this.$antdMessage.success(res.message)
              let params = this.formatData()
              this.current = 1
              let obj = {
                pageNo: this.current,
                pageSize: this.pageSize,
                ...params,
              }
              this.getData(obj)
              this.selectCancel()
            } else {
              this.$antdMessage.warning(res.message)
              this.selectCancel()
            }
          })
        } else {
          return false
        }
      })
    },
    handleWithdraw(row) {
      let that = this
      that.$antdConfirm({
        title: '确认接收吗？',
        content: '确认后，可在维修任务查看对应的故障信息，并进行维修结果的汇报',
        onOk() {
          let obj = {
            repairId: row.id,
          }
          receiveRepair(obj).then((res) => {
            if (res.code == 200) {
              that.$antdMessage.success(res.message)
              let params = that.formatData()
              that.current = 1
              let obj = {
                pageNo: that.current,
                pageSize: that.pageSize,
                ...params,
              }
              that.getData(obj)
            } else {
              that.$antdMessage.warning(res.message)
            }
          })
        },
        onCancel() {},
      })
    },
    timeApplyChange(a, b) {
      if (!b[0] && !b[1]) {
        this.modelApplyTime = []
        this.filterForm.commitTime = []
      } else {
        this.filterForm.commitTime = b
      }
    },
    getDictCode() {
      ajaxGetDictItems('mess_repair_urgent_level', null).then((res) => {
        if (res.success) {
          this.urgentList = res.result
        }
      })
    },

    openDetail(row) {
      this.$refs.repairDetail.initDetail(row.id)
    },
    batchAccept() {
      if (this.selectedRowKeys.length > 0) {
        let that = this
        that.$antdConfirm({
          title: '确认接收吗？',
          content: '确认后，可在维修任务查看对应的故障信息，并进行维修结果的汇报',
          onOk() {
            let obj = {
              repairId: that.selectedRowKeys.join(','),
            }
            receiveRepair(obj).then((res) => {
              if (res.code == 200) {
                that.$antdMessage.success(res.message)
                let params = that.formatData()
                this.current = 1
                let obj = {
                  pageNo: that.current,
                  pageSize: that.pageSize,
                  ...params,
                }
                that.getData(obj)
              } else {
                that.$antdMessage.warning(res.message)
              }
            })
          },
          onCancel() {},
        })
      } else {
        this.$antdMessage.warning('请先选择数据')
      }
    },
    // 批量派工
    batchAction() {
      if (this.selectedRowKeys.length > 0) {
        this.operateType = 'multiple'
        this.modalShow = true
      } else {
        this.$antdMessage.warning('请先选择数据')
      }
    },

    getData(obj, secondParams) {
      let params = {
        ...obj,
        status: 'wait_receipt',
      }
      messDeviceRepair(params).then((res) => {
        if (res.success) {
          if (res.result.total) {
            this.total = res.result.total
          } else {
            this.total = 0
          }
          let copyArr = JSON.parse(JSON.stringify(res.result.records))
          for (let item of copyArr) {
            for (let each in item) {
              if (!item[each] && item[each] != 0) {
                item[each] = '--'
              }
            }
          }
          this.tableData = copyArr
          if (secondParams) {
            this.checkBoxStatus()
          }
        } else {
          this.$antdMessage.warning(res.message)
        }
      })
    },

    /* 打开筛选 */
    handleShowFilter() {
      this.filterForm = JSON.parse(JSON.stringify(this.realFilterForm))
      this.showFilter = true
    },

    showColumn() {
      this.showSetColumn = true
      this.$nextTick(() => {
        this.$refs.SetColumn.paramsData(allColumn, this.BUSI_CONST.Entity.REPAIRWAITE_LIST, columns)
      })
    },
    sureBtn(emitArr) {
      this.columns = getNewColumns(allColumn, emitArr, actionArr)
      localStorage.setItem(this.BUSI_CONST.Entity.REPAIRWAITE_LIST, JSON.stringify(emitArr))
      this.tableKey += 1
      console.log('返回的数据是：', this.columns)
    },
    checkPlaceholder(dataIndex) {
      let str = ''
      switch (dataIndex) {
        case 'repairCode':
          str = '请输入报修编号'
          break
        case 'deviceCode':
          str = '请输入设备编号'
          break
        case 'deviceName':
          str = '请输入设备名称'
          break
        case 'extentStatusList':
          str = '请选择紧急程度'
          break
      }
      return str
    },
    pubSearch(confirm, dataIndex, clearFilters) {
      confirm() //用来关闭搜索弹窗
      // clearFilters() //用来重置搜索内容
      // console.log('这都是啥11：', confirm)
      this.filterForm = JSON.parse(JSON.stringify(this.tableFilterForm))
      this.realFilterForm = JSON.parse(JSON.stringify(this.tableFilterForm))
      let params = this.formatData()
      this.current = 1
      let obj = {
        pageNo: this.current,
        pageSize: this.pageSize,
        ...params,
      }
      this.getData(obj)
    },
    // table
    tableChange(pagination, filters, sorter, { currentDataSource }) {
      console.log('看看这是啥33：', sorter)
      let params = this.formatData()
      if (sorter.order) {
        let sortType = ''
        if (sorter.order == 'ascend') {
          sortType = 'ASC'
        } else {
          sortType = 'DESC'
        }
        let obj = {
          pageNo: this.current,
          pageSize: this.pageSize,
          ...params,
          sortType: sortType,
          sortColumn: sorter.columnKey == 'createTime' ? 'create_time' : '',
        }
        this.getData(obj)
      } else {
        let obj = {
          pageNo: this.current,
          pageSize: this.pageSize,
          ...params,
        }
        this.getData(obj)
      }
    },
    onSelectChange(selectedRowKeys, selectedRows) {
      // console.log('第一个参数是；', selectedRowKeys)
      // console.log('第second个参数是；', selectedRows)
      this.selectedRowKeys = selectedRowKeys
      this.checkBoxStatus()
    },
    checkBoxStatus() {
      if (this.selectedRowKeys.length == 0) {
        this.listIndeterminate = false
        this.listCheckAll = false
      } else {
        let tableIds = []
        for (let item of this.tableData) {
          tableIds.push(item.id)
        }
        let checkValue = this.isInclude(tableIds, this.selectedRowKeys)
        console.log()
        console.log('第一个参数是；', checkValue)
        if (checkValue) {
          this.listIndeterminate = false
          this.listCheckAll = true
        } else {
          this.listIndeterminate = true
          this.listCheckAll = false
        }
      }
    },
    isInclude(aa, bb) {
      return aa.every((item) => {
        return bb.some((sub) => {
          return sub === item
        })
      })
    },
    // 全选
    onCheckAllChange(e) {
      console.log('zhehsig', e.target)
      if (e.target.checked) {
        for (let item of this.tableData) {
          this.selectedRowKeys = this.selectedRowKeys.filter((each) => {
            return each != item.id
          })
          this.selectedRowKeys.push(item.id)
        }
      } else {
        for (let item of this.tableData) {
          this.selectedRowKeys = this.selectedRowKeys.filter((each) => {
            return each != item.id
          })
        }
      }
      this.checkBoxStatus()
    },
    clearArr() {
      this.selectedRowKeys = []
      this.checkBoxStatus()
    },
    // 分页
    onChangePage(current, pageSize) {
      this.current = current
      let params = this.formatData()
      let obj = {
        pageNo: this.current,
        pageSize: this.pageSize,
        ...params,
      }
      let secondParams = true
      this.getData(obj, secondParams)
    },
    onShowSizeChange(current, pageSize) {
      this.pageSize = pageSize
      this.current = 1
      let params = this.formatData()
      let obj = {
        pageNo: this.current,
        pageSize: this.pageSize,
        ...params,
      }
      let secondParams = true
      this.getData(obj, secondParams)
    },
    /* 确定筛选 */
    handleFilter() {
      console.log('当前选择的是：', this.filterForm)
      let params = this.formatData()
      this.current = 1
      let obj = {
        pageNo: this.current,
        pageSize: this.pageSize,
        ...params,
      }
      this.getData(obj)
      this.realFilterForm = JSON.parse(JSON.stringify(this.filterForm))
      this.tableFilterForm = JSON.parse(JSON.stringify(this.filterForm))
      this.showFilter = false
    },
    // 筛选传参数据
    formatData() {
      let copyForm = JSON.parse(JSON.stringify(this.filterForm))
      let params = {}
      params.repairCode = copyForm.repairCode
      params.deviceCode = copyForm.deviceCode
      params.deviceName = copyForm.deviceName
      if (copyForm.commitTime && copyForm.commitTime.length > 0) {
        params.createStartTime = copyForm.commitTime[0] + ' ' + '00:00:00'
        params.createEndTime = copyForm.commitTime[1] + ' ' + '23:59:59'
      } else {
        params.createStartTime = ''
        params.createEndTime = ''
      }
      if (copyForm.extentStatusList && copyForm.extentStatusList.length > 0) {
        params.urgency = copyForm.extentStatusList.join(',')
      } else {
        params.urgency = ''
      }
      return params
    },
    /* 删除已选 */
    delFiltered(key) {
      if (this.filteredFormLable[key] == '紧急程度') {
        this.filterForm[key] = []
      } else if (this.filteredFormLable[key] == '提交时间') {
        this.filterForm[key] = []
        this.modelApplyTime = []
      } else {
        this.filterForm[key] = ''
      }
    },
    /* 重置筛选 */
    resetFilter() {
      this.filterForm = {
        repairCode: '',
        deviceCode: '',
        deviceName: '',
        extentStatusList: [],
        commitTime: [],
      }
      this.modelApplyTime = []
    },
    /* 关闭筛选 */
    closeFilter() {
      this.showFilter = false
    },
    checkShow(item) {
      let currentBoolean = Array.isArray(item)
      if (currentBoolean) {
        if (item.length == 0) {
          return false
        } else {
          return true
        }
      } else {
        if (item) {
          return true
        } else {
          return false
        }
      }
    },
  },
}
</script>
<style scoped lang="less">
@import '~@/assets/less/public.less';
.flex(@jc,@ai,@fd:row) {
  display: flex;
  justify-content: @jc;
  align-items: @ai;
  flex-direction: @fd;
}
.table-operations {
  margin-bottom: 16px;
}

.table-operations > button {
  margin-right: 8px;
}
.topBox {
  .flex(space-between, center);
  margin-bottom: 16px;
}
.searchWorkOreder {
  .flex(flex-start, center);
  padding: 8px;
}
.pubColor {
  font-size: 14px;
  color: #1890ff;
  cursor: pointer;
}
.pagebox {
  /deep/ .ant-card-body {
    height: calc(100vh - 214px);
    overflow: hidden;
    padding: 20px 16px;
  }
}
.filter-tit {
  background: #fff;
  border-bottom: 1px solid @greyBorder;
  font-size: @fontSize4;
}
.filter-num {
  color: @normalFont;
}
.filter-body {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.margin-btn {
  margin-right: @distance5;
}
.filter-tag {
  display: inline-block;
  position: relative;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: @fontSize1;
  line-height: @fontSize1;
  max-width: 100%;
  background: @greyBg;
  color: @titFont;
  cursor: pointer;
  .tag-text {
    display: inline-block;
    padding-right: 20px;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .anticon-close {
    position: absolute;
    right: 8px;
    top: 8px;
  }
}
.tag-wrap:nth-of-type(n + 2) {
  margin-top: 10px;
}
.searchWorkOreder {
  .flex(flex-start, center);
  padding: 8px;
}
.modalTopBox {
  .flex(flex-start, center);
  margin-bottom: 8px;
  span {
    margin-left: 16px;
    display: block;
    overflow: hidden;
    color: rgba(0, 0, 0, 0.85);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4;
  }
}
.bigFont {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.78);
  box-sizing: border-box;
  padding-left: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}
.smallFont {
  font-size: 14px;
  box-sizing: border-box;
  padding-left: 12px;
}
</style>
